Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

slack-15.0: fix crash in vtbench #451

Merged
merged 1 commit into from
Jul 15, 2024

Conversation

timvaillancourt
Copy link
Member

@timvaillancourt timvaillancourt commented Jul 11, 2024

Description

This PR fixes a crash in v15's vtbench, reproduction:

tvaillancourt@tvailla-ltmxctu vitess % git checkout slack-15.0
Switched to branch 'slack-15.0'
Your branch is up to date with 'origin/slack-15.0'.
tvaillancourt@tvailla-ltmxctu vitess % make build
Thu Jul 11 18:07:08 CEST 2024: Building source tree
tvaillancourt@tvailla-ltmxctu vitess % ./bin/vtbench                                             
vtbench flag redefined: log_rotate_max_size
panic: vtbench flag redefined: log_rotate_max_size

goroutine 1 [running]:
github.com/spf13/pflag.(*FlagSet).AddFlag(0xc00012c000, 0xc0001317c0)
	github.com/spf13/pflag@v1.0.5/flag.go:848 +0x5fc
github.com/spf13/pflag.(*FlagSet).VarPF(0xc00012c000, {0x604d378, 0x6611ab8}, {0x5a8f4e2, 0x13}, {0x0, 0x0}, {0x5ab2c9f, 0x36})
	github.com/spf13/pflag@v1.0.5/flag.go:831 +0x105
github.com/spf13/pflag.(*FlagSet).VarP(...)
	github.com/spf13/pflag@v1.0.5/flag.go:837
github.com/spf13/pflag.(*FlagSet).Uint64Var(...)
	github.com/spf13/pflag@v1.0.5/uint64.go:45
vitess.io/vitess/go/vt/log.RegisterFlags(0xc00012c000?)
	vitess.io/vitess/go/vt/log/log.go:81 +0x45
main.initFlags(0xc00012c000)
	vitess.io/vitess/go/cmd/vtbench/vtbench.go:108 +0x265
main.main.func1(0xc00012c000)
	vitess.io/vitess/go/cmd/vtbench/vtbench.go:119 +0x87
vitess.io/vitess/go/vt/servenv.GetFlagSetFor({0x5a81df2, 0x7})
	vitess.io/vitess/go/vt/servenv/servenv.go:347 +0xa6
vitess.io/vitess/go/vt/servenv.ParseFlags({0x5a81df2, 0x7})
	vitess.io/vitess/go/vt/servenv/servenv.go:316 +0x2c
main.main()
	vitess.io/vitess/go/cmd/vtbench/vtbench.go:123 +0x57

With the fix ✅:

tvaillancourt@tvailla-ltmxctu vitess % ./bin/vtbench                            
F0711 18:09:30.063976    6027 vtbench.go:149] vtbench requires either host/port or unix_socket

This is a one-time patch that is not needed in our next release

Related Issue(s)

Checklist

  • "Backport to:" labels have been added if this change should be back-ported
  • Tests were added or are not required
  • Did the new or modified tests pass consistently locally and on the CI
  • Documentation was added or is not required

Deployment Notes

Signed-off-by: Tim Vaillancourt <tim@timvaillancourt.com>
@github-actions github-actions bot added this to the v15.0.5 milestone Jul 11, 2024
@timvaillancourt timvaillancourt marked this pull request as ready for review July 11, 2024 16:10
@timvaillancourt timvaillancourt requested a review from a team as a code owner July 11, 2024 16:10
@timvaillancourt timvaillancourt merged commit e4d7f05 into slack-15.0 Jul 15, 2024
180 of 195 checks passed
@timvaillancourt timvaillancourt deleted the fix-vtbench-crash_slack-15.0 branch July 15, 2024 18:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants